local skill = fk.CreateSkill({
  name = "2c__youwei",
})

Fk:loadTranslationTable{
  ["2c__youwei"] = "游危",
  [":2c__youwei"] = "每回合共限一次，有角色使用非伤害牌时,你可以摸一张牌。当你受到伤害后，若你手牌数不等于你体力值，你弃置所有手牌。",
  ["$2c__youwei1"] = "清而不清，忠而不忠。",
  ["$2c__youwei2"] = "薄权薄势，恐受千刀所指!",
  ["$2c__youwei3"] = "缘我反复无常，落得如此下场。",
}

skill:addEffect(fk.TargetSpecified, { 
  can_trigger = function(self, event, target, player, data)
    return  player:hasSkill(skill.name) and not data.card.is_damage_card and player:usedSkillTimes(skill.name) < 1
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(1,skill.name)
  end,
})

skill:addEffect(fk.Damaged, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target==player and player:hasSkill(skill.name) and player.hp ~= player:getHandcardNum() and player:usedSkillTimes(skill.name) < 1
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    player:throwAllCards("h")
    player:broadcastSkillInvoke(skill.name, 3)
  end,
})

return skill

